package com.spark.lola.feign;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.spark.lola.logistics.entity.CarSubscribe;
import com.spark.lola.logistics.entity.LocationInfo;
import com.spark.lola.support.mybatis.entity.QueryParam;
import com.spark.lola.statistics.entity.StatisticsCar;
import com.spark.lola.statistics.entity.StatisticsDriver;
import com.spark.lola.statistics.entity.StatisticsLogistics;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author: DengYeJun
 * @Date: 2020/4/28 18:53
 */
public interface LogisticsFeignService {
    /**
     * 获取地址库
     * @param id
     * @return
     */
    LocationInfo findById(Long id);

    IPage<CarSubscribe> findPage(QueryParam<CarSubscribe> queryParam);

    /**
     * @description: 预订
     * @param: carSubscribeId 回头车预订记录id
     * @param: subscribeId 预订人id
     * @param: subscribeName 预订人姓名
     * @return: void
     * @author: wzp
     * @date: 2020/5/12
     */
    void subscriber(long carSubscribeId, long subscribeId, String subscribeName) throws Exception;

    /**
     * @description: 取消预订
     * @param: carSubscribeId 回头车预订记录id
     * @param: subscribeId 取消预订人id
     * @return: void
     * @author: wzp
     * @date: 2020/5/12
     */
    void cancel(long carSubscribeId, long subscribeId) throws Exception;

    List<LocationInfo> getCompany();

    Integer getCompanySize();

    LocationInfo getCompanyById(Long id);

    /**
     * @description: 获取货运统计信息
     * @param: null
     * @return:
     * @author: wzp
     * @date: 2020/5/14
     */
    StatisticsLogistics getStatisticsLogistics(Date startTime, Date endTime);

    /**
     * @description: 获取驾驶员货运统计信息
     * @param: null
     * @return:
     * @author: wzp
     * @date: 2020/5/14
     */
    List<StatisticsDriver> getStatisticsDriver(Date startTime, Date endTime);

    /**
     * @description: 获取车辆货运统计信息
     * @param: null
     * @return:
     * @author: wzp
     * @date: 2020/5/14
     */
    List<StatisticsCar> getStatisticsCar(Date startTime, Date endTime);

    BigDecimal getLogisticsTotalWeight(String startTime, String endTime, long productId);

    /**
     * 获取业务主管纸厂数量
     * @param leaderId
     * @return
     */
    List<Long> getIdsByLeaderId(Long leaderId);

    /**
     * 获取财务纸厂数量
     * @param purchaseId
     * @return
     */
    List<Long> getIdsByPurchaseId(Long purchaseId);

    /**
     * 获取出纳纸厂数量
     * @param cashierId
     * @return
     */
    List<Long> getIdsByCashier(Long cashierId);
}
